export default {
  // binding.value 可以自行设置。如果设置了则跟着设置的时间走
  // 例如：v-th-click='500'
  inserted (el, binding, vnode) {
    el.addEventListener('click', () => {
      if (!el.disabled) {
        el.disabled = true
        setTimeout(() => {
          el.disabled = false
        }, binding.value || 1000)
      }
    })
  }
}
